<%@ page language="java" pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%
	try {
		if (pageContext.findAttribute("me") == null) {
			response.sendRedirect(request.getContextPath()
					+ "/login.jsp");
			return;
		}
%>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/common/meta.jsp"%>
<link href="${ ctx}/skins/floatstyle.css" rel="stylesheet"  type="text/css" />

<link href="${ ctx}/skins/home.css" rel="stylesheet" type="text/css" />
<link href="${ ctx}/skins/picturemodel.css" rel="stylesheet"  type="text/css" />
<link href="${ctx }/skins/index.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="${ctx }/scripts/index.js"></script>
<script type="text/javascript" src="${ctx }/scripts/article.js"></script>

<script type="text/javascript">
	$(document).ready(function() {
		     readyArticle();   //加载博文功能的article.js脚本实现
   	         
		     ready();         //加载index.jsp中独有的脚本
});
</script>

<title>分享平台博客系统</title>
<meta name="keywords" content="document share, blog, njupt" />
<meta name="description" content="http://www.njupt.net 分享平台博客来记录我们的心声" />
</head>
<body id="page-home">
	<%@ include file="/common/header.jsp"%>
	<div class='page-content'>

		<!-- 做边框个人信息 -->
		<div id='column-left'><%@ include file="/common/left.jsp"%></div>

		<!-- 中间部分：发表博文、博文浏览 -->
		<div id="column-main">
			<!-- 发表博文的头部 -->
			<ul id="publishPostBar" class="m-nav2">
				<nativeSql:sqlQueryForUnique
					sql="select f_picture_appended as avatarId from app_user  where f_id = ${me.id }"
					id="meavatar" />
				<li><a class="publishlink-user" href="javascript:void(0);"><img
						alt="头像"
						src="${ctx}/user/file.action?method:previewPic&fileId=${meavatar.avatarId }"></img>
				</a>
				</li>
				<li><a class="publishlink-text"
					href="${ctx }/blog/newArticleForm.jsp?type=text"><img alt="文字"
						src="${ctx }/img/eheader1.png"></img>
				</a>
				</li>
				<li><a class="publishlink-picture"
					href="${ctx }/blog/newArticleForm.jsp?type=picture"><img
						alt="图片" src="${ctx }/img/eheader2.png"></img>
				</a>
				</li>
				<li><a class="publishlink-music"
					href="${ctx }/blog/newArticleForm.jsp?type=music"><img alt="音乐"
						src="${ctx }/img/eheader3.png"></img>
				</a>
				</li>
				<li><a class="publishlink-video"
					href="${ctx }/blog/newArticleForm.jsp?type=video"><img alt="视频"
						src="${ctx }/img/eheader4.png"></img>
				</a>
				</li>
			</ul>


			<!-- 博客的正文 -->
			<div class="feed-list" id="feed-list">
				<center>
					<img style="padding-top: 36px; padding-bottom: 36px;"
						src="${ctx }/img/loading.gif">
				</center>
			</div>

		</div>

		<!-- 右边框：最新图片博文、最新博文 -->
		<div id='column-right'><%@ include file="/common/right.jsp"%></div>
	</div>


	<div style="clear: both;"></div>

	<!-- 头像上传组件 -->
	<div id="avatar-upload-dialog" title="头像上传组件" style="display: none;">

		<input type="text" size="20" name="upfile" id="upfile"
			style="border: 1px dotted rgb(30, 139, 180); width: 80%; height: 25px;">
		<input type="button" class="button" value="选择图片"
			onclick="sampleFile.click()" style="margin-bottom: 7px;"> <input
			type="file" id="sampleFile" name="sampleFile"
			accept="image/gif, image/jpeg" style="display: none"
			onchange="upfile.value=this.value;fileSelected();"> <br>
		<div id="progressNumber"></div>

		<span id="data-avatar-hidden" data-avatar-hidden=""></span>

		<div id="avatarPreviewPic">
			<strong>头像效果预览：</strong><br>
		</div>

		<div id="OriPreviewPic">
			<strong>原图预览：</strong><br>
		</div>

	</div>
	
	<%} catch (Exception e) {
				e.printStackTrace();
			}%>
</body>
</html>